<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index');

    // 广告位模块
    $router->resource('positions', 'PositionsController');

    // 媒体模块
    $router->resource('media', 'MediaController');

    // 行业模块
    $router->resource('industries', 'IndustriesController');

    // 广告主模块
    $router->resource('clients', 'ClientController');

    // 模板管理
    $router->resource('template', 'TemplateController');

    // 广告投放管理
    $router->resource('adverti', 'AdvertiController');

    // 活动模块
    $router->resource('activitys', 'ActivitysController');

    // 访问统计活动列表
    $router->resource('visitor', 'VisitorRecordController');

    // 广告位广告列表
    $router->resource('custom', 'PositionAdvertiPutController');

    // 活动统计详情
    $router->get('record/{id}', 'RecordController@index');

    // 广告位统计列表
    $router->resource('analyze', 'PositionAnalyzeController');

    // 广告位统计详情
    $router->get('position/analyze/{id}', 'PositionAnalyzeController@analyze');

    // 导出数据统计excel
    $router->get('excel/export','ExcelController@export');

    // 广告位广告
    $router->resource('position/adverti', 'PositionAdvertiController');

    // 报名列表
    $router->resource('prize/draw', 'PrizeDrawController');

    Route::group([
        'prefix'        => 'api'
    ], function (Router $router) {
        $router->get('activity/img/{id}', 'PositionsController@activityImg');
        $router->get('activity/synchron/{id}', 'AdvertiController@synchron');
    });

});


